[Unit]
Description=PostgreSQL database server
Documentation=man:postgres(1)
{% if supabase_internal is defined %}
Requires=database-optimizations.service
After=database-optimizations.service
{% endif %}

[Service]
Type=notify
User=postgres
ExecStart=/usr/lib/postgresql/bin/postgres -D /etc/postgresql
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutStopSec=90
TimeoutStartSec=86400
Restart=always
RestartSec=5
OOMScoreAdjust=-1000

[Install]
WantedBy=multi-user.target
